using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using SmartLink.DTOS;
using SmartLink.DTOS.SysBasic;
using SmartLink.Application.IServices;
using SmartLink.Domain.Entity;

namespace SmartLink.WebApi.Controllers.System
{
    /// <summary>
    /// 组织机构管理(公司)
    /// </summary>
    public class OrganizationController : BaseAPIControl
    {
        private ISysBasicAppServices _sysBasicAppServices;
        public OrganizationController(ISysBasicAppServices sysBasicAppServices)
        {
            _sysBasicAppServices = sysBasicAppServices;
        }


        #region  组织机构管理

        ///// <summary>
        ///// 添加组织
        ///// </summary>
        ///// <param name="inOrganizationDTO"></param>
        ///// <returns></returns>
        //[HttpPost]
        //public Results AddOrganization([FromBody] InOrganizationDTO inOrganizationDTO)
        //{
        //    if (inOrganizationDTO.ParentID <= 0) inOrganizationDTO.ParentID = null;

        //    return _sysBasicAppServices.AddOrganization(inOrganizationDTO);
        //}

        ///// <summary>
        ///// 更新组织
        ///// </summary>
        ///// <param name="OrganizationDTO"></param>
        ///// <returns></returns>
        //[HttpPost]
        //public Results UpdateOrganization([FromBody] UpdateOrganizationDTO OrganizationDTO)
        //{
        //    return _sysBasicAppServices.UpdateOrganization(OrganizationDTO);
        //}

        ///// <summary>
        ///// 删除组织
        ///// </summary>
        ///// <param name="deleteIDDto orgId"></param>
        ///// <returns></returns>
        //[HttpPost]
        //public Results DeleteOrganization([FromBody] DeleteIDDto deleteIDDto)
        //{
        //    return _sysBasicAppServices.DeleteOrganization(deleteIDDto);
        //}

        ///// <summary>
        ///// 组织机构（公司）列表(分页)
        ///// </summary>
        ///// <param name="PagePara"></param>
        ///// <returns></returns>
        //[HttpPost]
        //public Results<PageData<OrganizationDTO>> GetOrganizationList([FromBody] OrganizationPagePara PagePara)
        //{
        //    return _sysBasicAppServices.GetOrganizationList(PagePara);
        //}

        /// <summary>
        /// 组织机构列表(不分页)
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public Results<IList<OrganizationNoPageDTO>> GetOrganizationListinfo()
        {
            return _sysBasicAppServices.OrganizationListinfo();
        }

        ///// <summary>
        ///// 获取单个组织(公司)信息
        ///// </summary>
        ///// <param name="getIDDTO orgId"></param>
        ///// <returns></returns>
        //[HttpPost]
        //public Results<UpdateOrganizationDTO> GetSingleOrganization([FromBody] GetIDDTO getIDDTO)
        //{
        //    return _sysBasicAppServices.GetSingleOrganization(getIDDTO);
        //}


        ///// <summary>
        ///// 更新客户（公司）状态
        ///// </summary>
        ///// <param name="updateUserStatusDTO"></param>
        ///// <returns></returns>
        //[HttpPost]
        //public Results UpdateOrgStatus([FromBody] UpdateOrgStatus UpdateOrgStatus)
        //{
        //    return _sysBasicAppServices.UpdateOrgStatus(UpdateOrgStatus);
        //}

        #endregion
    }
}
